Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discard out-of-bounds binned breaks after generating labels #6061

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6054.

Briefly, when oob breaks were discarded, atomic labels became out-of-sync. This PR discards such breaks after labels have been retrieved.

Reprex from issue:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
data <- data.frame(x = 1:2)
ggplot(data) + 
  geom_col(aes(x, x, fill = x)) + 
  scale_fill_steps2(breaks = 1:3, labels = 1:3)

Created on 2024-08-27 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scale_x_steps2() throws an error when labels and breaks are manually specified
1 participant